import SockJS from 'sockjs-client/dist/sockjs.min.js';
import Stomp from 'stompjs';
import { dataURLtoBlob } from '/@/utils/file/base64Conver';


export function connWebSocket(){
  let socket = new SockJS('http://localhost:8081/chat');
  let stompClient = Stomp.over(socket);
  stompClient.connect({},()=>{
    stompClient.subscribe('/topic/getResponse',(message)=>{
      data.value = JSON.parse(message.body);
    });
    stompClient.subscribe('/topic/1/getResponse',(message)=>{
      data.value = JSON.parse(message.body);
    });
  })

}
